package ru.amse.tsyganov.jumleditor.graphicaleditor.collaboration;

import ru.amse.tsyganov.jumleditor.graphicaleditor.GraphicalEditor;
import ru.amse.tsyganov.jumleditor.graphicaleditor.common.AddStateMode;
import ru.amse.tsyganov.jumleditor.model.collaboration.Actor;
import ru.amse.tsyganov.jumleditor.model.common.State;
import ru.amse.tsyganov.jumleditor.view.collaboration.ActorView;
import ru.amse.tsyganov.jumleditor.view.common.StateView;

public class AddActorMode extends AddStateMode {

	public AddActorMode(GraphicalEditor graphicalEditor) {
		super(graphicalEditor);
	}

	@Override
	public StateView<? extends State> createNewState() {
		Actor actor = new Actor();
		ActorView<? extends Actor> newActor = 
			new ActorView<Actor>(actor, getEditor().getActivityGraphView());
		
		return newActor;
	}

}
